﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing; 
using System.Text;
using System.Windows.Forms;

using Microsoft.Reporting.WinForms;
using MyHotel.MyHotel_MHBaoCaoMatDo_BUS_Webservice;

namespace MyHotel.Reports
{
    public partial class frmReportBaoCaoMatDo : Form
    {
        private int _thang;
        private List<BaoCaoMatDoReport> _source;

        public frmReportBaoCaoMatDo(int thang, List<BaoCaoMatDoReport> source)
        {
            _thang = thang;
            _source = source;
            InitializeComponent();
        }

        private void frmReportBaoCaoMatDo_Load(object sender, EventArgs e)
        {
            try
            {
                List<ReportParameter> param = new List<ReportParameter>();
                param.Add(new ReportParameter("Thang", _thang.ToString()));
                reportViewer1.LocalReport.SetParameters(param);
                BaoCaoMatDoDTOBindingSource.DataSource = _source;
                this.reportViewer1.RefreshReport(); 
            }
            catch (Exception)
            {
            }
        }
    }
}
